package com.study.sbsummary.config.kafka.consumer;

import com.study.sbsummary.config.kafka.Topics;
import org.apache.kafka.clients.consumer.Consumer;

public interface IConsumerThread extends Runnable {
    void run();

    IRecordsHandler handler();

    Consumer consumer();

    default String name() {
        return topic().getName();
    }

    Topics.Topic topic();

    default void close() {
        consumer().close();
    }
}
